<template>
  <div class="head">
    <div class="myheader">
      <div class="left">
        <slot name="left"></slot>
      </div>
      <div>{{ title }}</div>
      <div class="right">
        <slot name="right"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["title"],
};
</script>

<style lang="less" scoped>
.head {
  padding-left: 0 50px;
}
.myheader {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #26a2ff;
  border-bottom: 2px solid #ccc;
  color: #fff;
  box-sizing: border-box;

  .left {
    flex: 1;
    padding: 0 10px;
  }
  .right {
    flex: 1;
  }
  .van-icon {
    font-size: 20px;
  }
}
</style>